home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
090
/
cmln1084.arc
/
PORTC1.LTG
< prev
next >
Wrap
Text File
|
1986-10-01
|
1KB
|
53 lines
REGINA -- THIS LISTING HAS PROBLEMS...SEE ME
CRAIG
/* dgsdefs.h - Definintions for the digital searching routines */
#define TRUE 1
#define FALSE 0
#define NOSYM 0 /* returned for "no symbol found" */
/* Flag masks for indexed trees */
#define SYM 1
#define SUC 2
#define ALT 4
#define EXACT TRUE /* compile 'sdgx' for an exact match */
#define galloc() ((struct tblctrl *)malloc(sizeof(struct tblctrl)))
#define xalloc() ((struct xtbctrl *)malloc(sizeof(struct xtbctrl)))
struct synode
{
char sym;
short int symno; /* symbol # */
struct synode *suc;
struct synode *alt;
};
struct llist
{
char *symptr;
short int symno;
struct llist *suc;
};
struct tblctrl
{
struct synode *syptr; /* pointer to base of actual table */
int depth; /* max depth of the digital search path */
int nentry; /* current # of entries */
int nnodes; /* number of tree nodes*/
int nlinks; /* # of links in the linked list*/
int nchars; /* # of chars in the residual strings */
};
struct xtbctrl
{
char *tblptr;
int depth;
int nentry;
int size; /* size in bytes of the table */
};